// Copyright@ChenChao

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "AuraPlayerController.generated.h"

class IEnemyInterface;
class UInputMappingContext;
class UInputAction;
struct FInputActionValue;

/**
 * 
 */
UCLASS()
class AURA_API AAuraPlayerController : public APlayerController
{
	GENERATED_BODY()
public:
	AAuraPlayerController();
	/*虚拟函数:玩家帧更新*/
	virtual void PlayerTick(float DeltaTime) override;
protected:
	virtual void BeginPlay() override;
	/*添加输入组件*/
	virtual void SetupInputComponent() override;
private:
	UPROPERTY(EditAnywhere,Category = "Input")
	TObjectPtr<UInputMappingContext> AuraContext;       //输入映射上下文
	
	UPROPERTY(EditAnywhere,Category = "Input")
	TObjectPtr<UInputAction> MoveAction;				//移动动作

	void Move(const FInputActionValue& InputActionValue);

	/*光标追踪*/
	void CursorTrace();

	IEnemyInterface* LastActor;
	IEnemyInterface* ThisActor;
	
};
